﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Secure/Secure.Master" AutoEventWireup="true" CodeBehind="Add Worker.aspx.cs" Inherits="Site.Secure.Add_Worker" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <h1>Add Worker</h1>
<a>This page allows you to add a</a>
    worker to the Worker&#39;s Database. Please note you are required to allocate a 
    phone the each worker. If a worker does not need a phone the select &#39;DEFAULT&#39; as 
    in the &quot;Phone&quot; field.
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table>
<tr>
<td style="width: 126px"><a>Name: 
    <asp:Label ID="valName" runat="server" ForeColor="Red" Text="*" Visible="False"></asp:Label>
    </a></td>
<td> 
    <asp:TextBox ID="edtName" runat="server" CssClass="Input" Width="150px" 
        MaxLength="50"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 126px"><a>Surname:<asp:Label ID="valSurname" runat="server" 
        ForeColor="Red" Text="*" Visible="False"></asp:Label>
    </a></td>
<td><asp:TextBox ID="edtSurname" runat="server" CssClass="Input" Width="150px" 
        MaxLength="255"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 126px"><a>ID Number:<asp:Label ID="valID" runat="server" 
        ForeColor="Red" Text="*" Visible="False"></asp:Label>
    </a></td>
<td><asp:TextBox ID="edtID" runat="server" CssClass="Input" Width="150px" 
        MaxLength="13"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 126px"><a>Email:</a></td>
<td><asp:TextBox ID="edtEmail" runat="server" CssClass="Input" Width="150px" 
        MaxLength="255"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 126px"><a>Cellphone No:<asp:Label ID="valCell" runat="server" 
        ForeColor="Red" Text="*" Visible="False"></asp:Label>
    </a></td>
<td><asp:TextBox ID="edtCell" runat="server" CssClass="Input" Width="150px" 
        MaxLength="10"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 126px"><a>Home No:</a></td>
<td><asp:TextBox ID="edtHome" runat="server" CssClass="Input" Width="150px" 
        MaxLength="10"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 126px">Address<a>:<asp:Label ID="valAddress" runat="server" 
        ForeColor="Red" Text="*" Visible="False"></asp:Label>
    </a></td>
<td><asp:TextBox ID="edtAddress" runat="server" CssClass="Input" Width="150px" 
        MaxLength="255" Height="69px"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 126px"><a>D</a>river License:</td>
<td><asp:DropDownList ID="edtDrivers" runat="server" CssClass="Input" Width="150px" 
        MaxLength="255">
    <asp:ListItem Value="true">Yes</asp:ListItem>
    <asp:ListItem Value="false">No</asp:ListItem>
    </asp:DropDownList></td>
</tr>
<tr>
<td style="width: 126px"><a>Worker Type:</a></td>
<td><asp:DropDownList ID="edtType" runat="server" CssClass="Input" Width="150px" 
        MaxLength="255">
    <asp:ListItem Value="KEEPER">Bee Keeper</asp:ListItem>
    <asp:ListItem Value="HUBMANAGER">Hub Manager</asp:ListItem>
    <asp:ListItem Value="MANAGER">Manager</asp:ListItem>
    <asp:ListItem Value="PROCESSOR">Processor</asp:ListItem>
    </asp:DropDownList></td>
</tr>

<tr>
<td style="width: 126px">Notes<a>:</a></td>
<td><asp:TextBox ID="edtNotes" runat="server" CssClass="Input" Width="150px" 
        MaxLength="255" Height="69px"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 126px">Phone<a>:<asp:Label ID="valPhone" runat="server" 
        ForeColor="Red" Text="*" Visible="False"></asp:Label>
    </a></td>
<td><asp:DropDownList ID="edtPID" runat="server" CssClass="Input" Width="150px" 
        MaxLength="255" DataSourceID="SqlDataSource2" DataTextField="PID" 
        DataValueField="PID">
    </asp:DropDownList></td>
</tr>
<tr>
<td style="height: 30px; width: 126px;"></td>
<td align="right" style="height: 30px" ><asp:Button ID="Button1" runat="server" Text="Add" 
        onclick="Button1_Click" Width="77px" /></td>
</tr>
</table>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:csMain %>" 
        SelectCommand="SELECT * FROM [Users]"></asp:SqlDataSource>

<asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:csMain %>" 
        SelectCommand="SELECT * FROM [Phones]"></asp:SqlDataSource>
</asp:Content>
